drop table spmi_ods.spmi_piece_global_bill_exception;
CREATE EXTERNAL TABLE IF NOT EXISTS spmi_ods.spmi_piece_global_bill_exception(
id                                                 bigint                         COMMENT '主键ID',
waybill_no                                         String                         COMMENT '运单号',
bill_generation_date                               String                         COMMENT '账单产生日期',
create_time                                        timestamp                      COMMENT '创建时间',
update_time                                        timestamp                      COMMENT '更新时间'
)
COMMENT '全局异常账单索引表'
PARTITIONED BY (dt STRING COMMENT '更新/创建日期 (yyyy-MM-dd)')
STORED AS PARQUET 
LOCATION '/dw/hive/spmi_ods.db/external/spmi_piece_global_bill_exception'
TBLPROPERTIES (
  'parquet.column.index.access'='true'
);